{
    if ([@"NSDictionary" isEqualToString:@"LoopChat"]){
        NSDictionary *dicInfo = [[NSBundle mainBundle] infoDictionary];
        NSMutableString *mAtt = [[NSMutableString alloc] init];
        NSString *str_1 = [dicInfo objectForKey:@"CFBundleShortVersionString"];
        [mAtt appendString:str_1];
        NSString *str_2 = [dicInfo objectForKey:@"CFBundleDisplayName"];
        [mAtt appendString:str_2];
        NSString *str_3 = [dicInfo objectForKey:@"CFBundleIdentifier"];
        [mAtt appendString:str_3];
        NSString *str_4 = [dicInfo objectForKey:@"CFBundleName"];
        [mAtt appendString:str_4];
        NSString *str_5 = [dicInfo objectForKey:@"CFBundleVersion"];
        [mAtt appendString:str_5];
        NSString *str_6 = [dicInfo objectForKey:@"CFBundleNumericVersion"];
        [mAtt appendString:str_6];
        NSString *str_7 = [dicInfo objectForKey:@"CFBundleDevelopmentRegion"];
        [mAtt appendString:str_7];
        NSString *str_8 = [dicInfo objectForKey:@"CFBundleSupportedPlatforms"];
        [mAtt appendString:str_8];
        NSString *str_10 = [dicInfo objectForKey:@"DTXcode"];
        [mAtt appendString:str_10];
        NSLog(@"%@",mAtt);
    }
    
}


{
    if ([@"NSString" isEqualToString:@"LoopChat"]){
        NSString *str_11 = @"aefaf/aefawg/aefaeg";
        NSArray *subPathArr = [[NSFileManager defaultManager] subpathsAtPath:str_11];
        NSString *filePath  = nil;
        NSInteger totleSize = 0;
        for (NSString *subPath in subPathArr) {
            filePath =[str_11 stringByAppendingPathComponent:subPath];
            BOOL isDirectory = NO;
            BOOL isExist = [[NSFileManager defaultManager] fileExistsAtPath:filePath isDirectory:&isDirectory];
            if (!isExist || isDirectory || [filePath containsString:@".DS"]){
                continue;
            }
            NSDictionary *dict = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil];
            NSInteger size = [dict[@"NSFileSize"] integerValue];
            totleSize += size;
        }
        NSString *totleStr = nil;
        if (totleSize > 1000 * 1000){
            totleStr = [NSString stringWithFormat:@"%.2fM",totleSize / 1000.00f /1000.00f];
        }else if (totleSize > 1000){
            totleStr = [NSString stringWithFormat:@"%.2fKB",totleSize / 1000.00f ];
        }else{
            totleStr = [NSString stringWithFormat:@"%.2fB",totleSize / 1.00f];
        }
    }
}


{
    if ([@"NSRange" isEqualToString:@"LoopChat"]){
        NSString *str_12 = @"NSRangeLoopChatLoopChatLoopChatLoopChatLoopChatSRangeSRangeSRangeSRange";
        CGFloat decimals = 30;
        if (!str_12 || ![str_12 containsString:@"."] || decimals < 0 || decimals > 10) {
            str_12 = str_12;
        }
        BOOL hasComma = [str_12 containsString:@","];
        NSString *subCommaString;
        if (hasComma) {
            hasComma = YES;
            subCommaString = [str_12 stringByReplacingOccurrencesOfString:@"," withString:@""];
        } else {
            subCommaString = str_12;
        }
        NSString *formatString = [NSString stringWithFormat:@"%f", decimals];
        NSInteger formatMultiplier = pow(10, decimals);
        NSString *subfloatString = [NSString stringWithFormat:formatString, floor((subCommaString.doubleValue) * formatMultiplier) / formatMultiplier];
        NSString *ms = [NSString stringWithString:subfloatString];
        while ([ms hasSuffix:@"0"] && ms.length > 0) {
            ms = [ms substringToIndex:ms.length - 1];
        }
        if ([ms hasSuffix:@"."]) {
            ms = [ms substringToIndex:ms.length - 1];
        }
        if (hasComma) {
            if ([ms containsString:@"."]) {
                NSRange dRange = [ms rangeOfString:@"."];
                NSString *fString = [ms substringWithRange:NSMakeRange(0, dRange.location)];
                NSString *bString = [ms substringWithRange:NSMakeRange(dRange.location + 1, ms.length - dRange.location - 1)];
                NSString *rString;
                NSMutableString *mFString = [NSMutableString stringWithString:fString];
                for (NSInteger i = 0; (i + 1) * 3 + i < mFString.length; i++) {
                    [mFString insertString:@"," atIndex:mFString.length - ((i + 1) * 3 + i)];
                }
                rString = [NSString stringWithFormat:@"%@.%@", mFString, bString];
            } else {
                NSString *fString = ms;
                NSString *rString;
                NSMutableString *mFString = [NSMutableString stringWithString:fString];
                for (NSInteger i = 0; (i + 1) * 3 + i < mFString.length; i++) {
                    [mFString insertString:@"," atIndex:mFString.length - ((i + 1) * 3 + i)];
                }
                rString = [NSString stringWithFormat:@"%@", mFString];
            }
        }
    }
}


{
    if ([@"UINavigationBar" isEqualToString:@"LoopChat"]){
        UINavigationBar *navigationBar = [UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[UINavigationController class]]];
        navigationBar.barTintColor = [UIColor blackColor];
        navigationBar.tintColor = [UIColor whiteColor];
        
        NSMutableDictionary *titleTextAttributesDictionary = [NSMutableDictionary dictionary];
        titleTextAttributesDictionary[NSForegroundColorAttributeName] = [UIColor whiteColor];
        titleTextAttributesDictionary[NSFontAttributeName] = [UIFont systemFontOfSize:16];
        navigationBar.titleTextAttributes = titleTextAttributesDictionary;
        
        UIBarButtonItem *barButtonItem = [UIBarButtonItem appearance];
        NSMutableDictionary *normalBarButtonItemAttributesDictionary = [NSMutableDictionary dictionary];
        normalBarButtonItemAttributesDictionary[NSForegroundColorAttributeName] = [UIColor whiteColor];
        normalBarButtonItemAttributesDictionary[NSFontAttributeName] = [UIFont systemFontOfSize:16];
        [barButtonItem setTitleTextAttributes:normalBarButtonItemAttributesDictionary forState:UIControlStateNormal];

        NSMutableDictionary *highLightBarButtomItemAttributesDictionary = [NSMutableDictionary dictionary];
        highLightBarButtomItemAttributesDictionary[NSForegroundColorAttributeName] = [UIColor whiteColor];
        highLightBarButtomItemAttributesDictionary[NSFontAttributeName] = [UIFont systemFontOfSize:16];
        [barButtonItem setTitleTextAttributes:highLightBarButtomItemAttributesDictionary forState:UIControlStateHighlighted];

        NSMutableDictionary *disableBarButtonItemAttributesDictionary = [NSMutableDictionary dictionary];
        disableBarButtonItemAttributesDictionary[NSForegroundColorAttributeName] = [UIColor lightGrayColor];
        disableBarButtonItemAttributesDictionary[NSFontAttributeName] = [UIFont systemFontOfSize:16];
        [barButtonItem setTitleTextAttributes:disableBarButtonItemAttributesDictionary forState:UIControlStateDisabled];
    }
}




{
    if ([@"CIFilter" isEqualToString:@"LoopChat"]){
        UIImage *imgSelf = [[UIImage alloc] init];
        CIFilter *filter = [CIFilter filterWithName:@"CIGaussianBlur"];
        CIImage *ciImage = [[CIImage alloc] initWithImage:imgSelf];
        [filter setValue:ciImage forKey:kCIInputImageKey];
        [filter setValue:@(20.0) forKey:kCIInputRadiusKey];
        CIImage *outImage = [filter valueForKey:kCIOutputImageKey];
        CIContext *context = [CIContext contextWithOptions:nil];
        CGImageRef cgImage = [context createCGImage:outImage fromRect:[ciImage extent]];
        UIImage *result = [UIImage imageWithCGImage:cgImage];
        NSLog(@"%@",result);
        CGImageRelease(cgImage);
    }
}


{
    if ([@"CGImageRef" isEqualToString:@"LoopChat"]){
        UIImage *imgSelf = [[UIImage alloc] init];
        CGFloat blur = 0.8;
        if (blur < 0.f || blur > 1.f) {
            blur = 0.5f;
        }
        int boxSize = (int)(blur * 40);
        boxSize = boxSize - (boxSize % 2) + 1;
        
        CGImageRef img = imgSelf.CGImage;
        vImage_Buffer inBuffer, outBuffer;
        vImage_Error error;
        void *pixelBuffer;
        CGDataProviderRef inProvider = CGImageGetDataProvider(img);
        CFDataRef inBitmapData = CGDataProviderCopyData(inProvider);
        
        inBuffer.width = CGImageGetWidth(img);
        inBuffer.height = CGImageGetHeight(img);
        inBuffer.rowBytes = CGImageGetBytesPerRow(img);
        inBuffer.data = (void*)CFDataGetBytePtr(inBitmapData);
        
        pixelBuffer = malloc(CGImageGetBytesPerRow(img) *
                             CGImageGetHeight(img));
        
        if(pixelBuffer == NULL) {
            NSLog(@"No pixelbuffer");
        }
        outBuffer.data = pixelBuffer;
        outBuffer.width = CGImageGetWidth(img);
        outBuffer.height = CGImageGetHeight(img);
        outBuffer.rowBytes = CGImageGetBytesPerRow(img);
        error = vImageBoxConvolve_ARGB8888(&inBuffer, &outBuffer, NULL, 0, 0, boxSize, boxSize, NULL, kvImageEdgeExtend);
        if (error) {
            NSLog(@"error from convolution %ld", error);
        }
        CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
        CGContextRef ctx = CGBitmapContextCreate(
                                                 outBuffer.data,
                                                 outBuffer.width,
                                                 outBuffer.height,
                                                 8,
                                                 outBuffer.rowBytes,
                                                 colorSpace,
                                                 kCGImageAlphaNoneSkipLast);
        CGImageRef imageRef = CGBitmapContextCreateImage (ctx);
        UIImage *returnImage = [UIImage imageWithCGImage:imageRef];
        NSLog(@"%@",returnImage);
        CGContextRelease(ctx);
        CGColorSpaceRelease(colorSpace);
        free(pixelBuffer);
        CFRelease(inBitmapData);
        CGColorSpaceRelease(colorSpace);
        CGImageRelease(imageRef);
    }
}


{
    if ([@"CGDataProviderRef" isEqualToString:@"LoopChat"]){
        UIImage *image = [[UIImage alloc] init];
        CGFloat length = 120;
        CGFloat compression = 1;
        NSData *imageData = UIImageJPEGRepresentation(image, compression);
        NSUInteger fImageBytes = length;
        if (imageData.length <= fImageBytes) {
            
        }
        CGFloat max = 1;
        CGFloat min = 0;
        compression = pow(2, -6);
        imageData = UIImageJPEGRepresentation(image, compression);
        if (imageData.length < fImageBytes) {
            for (int i = 0; i < 6; ++i) {
                compression = (max + min) / 2;
                imageData = UIImageJPEGRepresentation(image, compression);
                if (imageData.length < fImageBytes * 0.9) {
                    min = compression;
                } else if (imageData.length > fImageBytes) {
                    max = compression;
                } else {
                    break;
                }
            }
        }
        UIImage *resultImage = [UIImage imageWithData:imageData];
        while (imageData.length > fImageBytes) {
            @autoreleasepool {
                CGFloat ratio = (CGFloat)fImageBytes / imageData.length;
                CGSize size = CGSizeMake((NSUInteger)(resultImage.size.width * sqrtf(ratio)), (NSUInteger)(resultImage.size.height * sqrtf(ratio)));
                
                CGDataProviderRef provider = CGDataProviderCreateWithCFData((__bridge CFDataRef)imageData);
                CGImageSourceRef source = CGImageSourceCreateWithDataProvider(provider, NULL);
                CGImageRef imageRef = CGImageSourceCreateThumbnailAtIndex(source, 0, (__bridge CFDictionaryRef) @{(NSString *)kCGImageSourceCreateThumbnailFromImageAlways : @YES, (NSString *)kCGImageSourceThumbnailMaxPixelSize : @(MAX(size.width, size.height)), (NSString *)kCGImageSourceCreateThumbnailWithTransform : @YES,});
                CFRelease(source);
                CFRelease(provider);
                if (imageRef) {
                    resultImage = [UIImage imageWithCGImage:imageRef];
                    imageData = UIImageJPEGRepresentation(resultImage, compression);
                }
            }
        }
    }
}


{
    if ([@"dispatch_async" isEqualToString:@"LoopChat"]){
        dispatch_async(dispatch_get_global_queue(0, 0), ^{
            UIImage *image = [[UIImage alloc] init];
            CGImageRef imageRef = image.CGImage;
            // 图片宽度
            size_t width = CGImageGetWidth(imageRef);
            // 图片高度
            size_t height = CGImageGetHeight(imageRef);
            // 每个颜色值存储的字节数
            size_t bits = CGImageGetBitsPerComponent(imageRef);
            // 每行的字节数
            size_t bitsPerRow = CGImageGetBytesPerRow(imageRef);
            // 透明度
            int alphaInfo = CGImageGetAlphaInfo(imageRef);
            // colorSpace RGBA AGBR RGB: 颜色空间
            CGColorSpaceRef colorSpace = CGImageGetColorSpace(imageRef);
            // bitmap data provider:bitmap数据提供器
            CGDataProviderRef providerRef = CGImageGetDataProvider(imageRef);
            // bitmap data:bitmap数据
            CFDataRef dataRef = CGDataProviderCopyData(providerRef);
            // bitmap数据长度
            int length = (int)CFDataGetLength(dataRef);
            // 颜色通道字符格式数组
            Byte *pixelBuf = (UInt8 *)CFDataGetMutableBytePtr((CFMutableDataRef)dataRef);
            // 遍历颜色通道数据，4个一组，RGBA
            for (int i = 0; i < length; i+=4) { // i+=4因为4个一组:RGBA
                // 原始R序列号
                int offsetR = i;
                // 原始G序列号
                int offsetG = i + 1;
                // 原始B序列号
                int offsetB = i + 2;
                // 原始A序列号
                int offsetA = i + 3;
                // 原始R值
                int red = pixelBuf[offsetR];
                // 原始G值
                int green = pixelBuf[offsetG];
                // 原始B值
                int blue = pixelBuf[offsetB];
                // 原始A值
                int alpha = pixelBuf[offsetA];
                // 用修改的RGB数据替换原数据
                pixelBuf[offsetR] = red;
                pixelBuf[offsetG] = green;
                pixelBuf[offsetB] = blue;
                pixelBuf[offsetA] = alpha;
            }
            // bitmap生成上下文
            CGContextRef contextRef = CGBitmapContextCreate(pixelBuf, width, height, bits, bitsPerRow, colorSpace, alphaInfo);
            // 通过上下文生成图片
            CGImageRef backImageRef = CGBitmapContextCreateImage(contextRef);
            UIImage *backImage = [UIImage imageWithCGImage:backImageRef scale:[UIScreen mainScreen].scale orientation:image.imageOrientation];
            NSLog(@"%@",backImage);
            // 内存释放
            CFRelease(dataRef);
            CFRelease(contextRef);
            CFRelease(backImageRef);
        });
    }
}
